import Vue from 'vue'
import Router from 'vue-router'
import searchpage from '@/view/searchpage'
import home from '@/view/home'
import druglist from '@/view/druglist'
import comparelist from '@/view/comparelist'
import seekclass from '@/view/seekclass'
import mapdetail from '@/view/mapdetail'
import nearshop from '@/view/nearshop'
import drugdetail from '@/view/drugdetail'
import shopro from '@/view/shopro'
import testvuex from '@/view/testvuex'

Vue.use(Router)

export default new Router({
  routes: [
    {//首页
      path: '/',
      name: 'home',
      component: home
    },
    {//搜索页面
      path: '/searchpage',
      name: 'searchpage',
      component: searchpage
    },
    {//产品搜索列表页面
      path: '/druglist',
      name: 'druglist',
      component: druglist
    },
    {//产品对比
      path: '/comparelist',
      name: 'comparelist',
      component: comparelist
    },
    {//分类找药
      path: '/seekclass',
      name: 'seekclass',
      component: seekclass
    },
    {//地图
      path: '/mapdetail',
      name: 'mapdetail',
      component: mapdetail
    },
    {//附近药店
      path: '/nearshop',
      name: 'nearshop',
      component: nearshop
    },
    {//药店详情
      path: '/drugdetail',
      name: 'drugdetail',
      component: drugdetail
    },
    {//店铺商品
      path: '/shopro',
      name: 'shopro',
      component: shopro
    },
    {//测试vuex
      path: '/testvuex',
      name: 'testvuex',
      component: testvuex
    }
  ]
})
